﻿// --------------------------------
// <copyright file="IOrderRepository.cs" company="OpenTicket">
//     Microsoft Public License (Ms-PL)
// </copyright>
// <author>Glenn</author>
// ---------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpenTicket.Repositories
{
    /// <summary>
    /// Repository for Order, OrderItems
    /// </summary>
    public interface IOrderRepository 
    {
        /// <summary>
        /// Gets all Orders from persistance
        /// </summary>
        /// <returns>All Orders</returns>
        IQueryable<OpenTicket.Model.Order> GetAllOrders();

        /// <summary>
        /// Saves a Order object to persistance
        /// </summary>
        /// <param name="order">The order.</param>
        /// <returns>The saved Order (with Id on insert)</returns>
        Model.Order Save(Model.Order order);

        /// <summary>
        /// Deletes the order.
        /// </summary>
        /// <param name="order">The order.</param>
        void DeleteOrder(Model.Order order);
    } 
}
